package com.ssm.service.impl;

import com.ssm.mapper.StudentMapper;
import com.ssm.model.Student;
import com.ssm.service.StudentService;
import com.ssm.vo.StudentScoresVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Lenovo on 2019-4-21.
 */
@Service("studentServiceImpl")
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public Integer add(Student student) {
        return null;
    }

    @Override
    public boolean exists(Student student) {
        return false;
    }

    @Override
    public Student getById(int id) {
        return null;
    }

    @Override
    public List<Student> getStudents() {
        return null;
    }

    @Override
    public void update(Student student) {

    }

    @Override
    public void delete(int id) {

    }

    @Override
    public void updatePwd(int id, String password) {

    }

    @Override
    public StudentScoresVo getStudentScores(int id) {
        return null;
    }

    @Override
    public boolean login(String name, String password) {
        if(studentMapper.login(name,password)!=null)
        return true;
        else
            return false;
    }

    @Override
    public List list() {
        return studentMapper.list();
    }
}
